/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */
import {GROUP_SEX, GROUP_STYLE, PASS_DETAILS} from '@/const/Dict'
import {PERSON_OPERA} from "@/const/personDict";

export const tableOption = {
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    menuWidth: 200,
    menuType: 'button',
    align: 'center',
    emptyBtnText: '重置', //清空按钮文案
    refreshBtn: true,
    showClomnuBtn: false,
    searchSize: 'mini',
    searchMenuSpan: 4,
    searchLabelWidth: 80,
    searchSpan: 4,
    labelWidth: "20%",
    addBtn: false,
    editBtn: false,
    viewBtn: false,
    selection: true,
    reserveSelection: true,
    props: {
        label: 'label',
        value: 'value'
    },
    column: [
        {
            label: '人员id',
            prop: 'id',
            hide: true
        },
        {
            label: '姓名',
            prop: 'personName',
            type: 'input',
            search: true,
        }, {
            label: '学号',
            prop: 'number',
            dicData: PASS_DETAILS,
        }, {
            label: '性别',
            prop: 'sex',
            type: 'select',
            search: true,
            dicData: GROUP_SEX,
        }, {
            label: '年级/班级',
            prop: 'sysDeptId',
            search: true,
            filter: false,
            type: 'tree',
            hide: true,
            dicUrl: '/campus/sysdept/detpTree/1/2,3',
            dicMethod: 'get',
            props: {
                label: 'name',
                value: 'deptId'
            },
        },
        {
            label: '年级',
            prop: 'deptParentName',
            dicData: PASS_DETAILS,
        }, {
            label: '班级',
            prop: 'sysDeptName',
            dicData: PASS_DETAILS,
        }, {
            label: '学生属性',
            prop: 'identityKey',
            search: true,
            type: 'select',
            dicUrl: '/campus/identity/selectAll?groupNum=2',
            dicMethod: 'get',
            props: {
                label: 'name',
                value: 'id'
            },
        }, {
            label: '楼栋',
            prop: 'buildingName',
            dicData: PASS_DETAILS,
        }, {
            label: '宿舍号',
            prop: 'dormNumber',
            dicData: PASS_DETAILS,
        }, {
            width: 150,
            label: '时间方案',
            prop: 'schemeName',
            dicData: PASS_DETAILS,
        }, {
            width: 150,
            label: '方案修改时间',
            prop: 'updateTime',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm',
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            addDisplay: false,
            editDisplay: false,
        }, {
            width: 100,
            label: '修改操作人',
            prop: 'operator',
            dicData: PERSON_OPERA,
        }, {
            label: '状态',
            prop: 'state',
            type: 'select',
            search: true,
            slot: true,
            dicData: GROUP_STYLE,
        }
    ]
}

